package math.geomUtils;

import math.base.Point2d;
import math.base.Vector2d;
import math.geom2d.Curve2d;
import math.geom2d.Line2d;

/**
 * @author Saga
 *
 */
public class ElCLib {

    public static final Point2d calcValue(final Curve2d _curve, final double _param) {
        return null;
    }


    public static final Vector2d calcDerivative(final Curve2d _curve, final double _param) {
        return null;
    }

    public static final Vector2d calcDerivativeN(final Curve2d _curve, final double _param,
            final int _order) {
        return null;
    }

    public static final void calcValueAndDerivative1(final Curve2d _curve, final double _param,
            final Point2d _pt, final Vector2d _der1) {

    }

    public final void calcValueAndDerivative2(final Curve2d _curve, final double _param,
            final Point2d _pt, final Vector2d _der1, final Vector2d _der2) {

    }

    public static final void calcValueAndDerivative3(final Curve2d _curve, final double _param,
            final Point2d _pt, final Vector2d _der1, final Vector2d _der3) {

    }

    //line
    private final Point2d calcLineValue(final Line2d _line, final double _param) {
        return _line.getOrigin().added(_line.getDirect().multiplied(_param));
    }

    private final Vector2d calcLineDerivative(final Line2d _line, final double _param) {
        return new Vector2d(_line.getDirect());
    }

    private final void calcValueAndDerivative1(final Line2d _line, final double _param,
            final Point2d _pt, final Vector2d _der1) {
        _pt.setCoord(_line.getOrigin().getCoord()
                .added(_line.getDirect().getCoord().multiplied(_param)));
        _der1.setCoord(_line.getDirect().getCoord());
    }
}
